package course.p7_binaryTree.s4_AVLTree;

import course.p7_binaryTree.Node;
import org.junit.Test;

import java.util.List;

public class AVLTreeTest {


    @Test
    public void insertTest(){
        AVLTree one = new AVLTree();
        Node node = new Node(6);
        one.insert(node,5);
        System.out.println(node.getHeight());
        one.insert(node,9);
        one.insert(node,7);
        System.out.println(node.getHeight());
        one.insert(node,8);
        one.insert(node,3);
        one.insert(node,2);
        System.out.println(node.getHeight());
        one.Check3(node);
        System.out.println();
        List<List<Integer>> result = one.levelOrder(node);
        for(List<Integer> item:result){
            System.out.println(item);
        }
    }


}
